package service

import (
	"gitee.com/kristas/booting-go/framework"
	"gitee.com/kristas/booting-go/framework/core/statement/types"
)

func init() {
	framework.Component(new(FactoryImpl))
}

type Factory interface {
	GetAccountService() AccountService
	GetDemoCacheService() DemoCacheService
	GetRouteService() RouteService
}

type FactoryImpl struct {
	types.Component  `name:"service_factory"`
	AccountService   AccountService   `wire:""`
	DemoCacheService DemoCacheService `wire:""`
	RouteService     RouteService     `wire:""`
}

func (f *FactoryImpl) GetAccountService() AccountService {
	return f.AccountService
}

func (f *FactoryImpl) GetDemoCacheService() DemoCacheService {
	return f.DemoCacheService
}

func (f *FactoryImpl) GetRouteService() RouteService {
	return f.RouteService
}
